﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="SearchBanner.ascx.vb"
    Inherits="WebForm_ManageBanner_SearchBanner" %>
<%@ Register Namespace="My" TagPrefix="cc1" %>
<%@ Register Src="BannerUploader.ascx" TagName="BannerUploader" TagPrefix="My" %>
<My:MyGridView ID="GridView1" runat="server" AllowHoverEffect="False" AllowHoverSelect="False"
    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="BannerID,Active"
    DataSourceID="ObjectDataSource1" EmptyDataText="<%$ Resources:NoFiles %>" MouseOverColor=""
    MySortDirection="Ascending" SkinID="pager" TotalRowCount="0" Width="100%" EmptyDataRowStyle-HorizontalAlign="Center">
    <HeaderStyle Wrap="False" />
    <AlternatingRowStyle BackColor="AliceBlue" />
    <RowStyle BackColor="White" />
    <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
    <Columns>
        <asp:TemplateField SortExpression="Url" HeaderText="<%$ Resources:Url %>">
            <edititemtemplate>
<asp:TextBox runat="server" Text='<%# Bind("Url") %>' id="TextBox1"></asp:TextBox>
</edititemtemplate>
            <itemtemplate>
<asp:ImageButton id="imgbtnBanner" runat="server" __designer:wfdid="w2" ImageUrl=""></asp:ImageButton><BR /><asp:Label id="lblUrl" runat="server" Text='<%# Bind("Url") %>' __designer:wfdid="w1"></asp:Label>
</itemtemplate>
            <headerstyle horizontalalign="Center" />
        </asp:TemplateField>
         <asp:BoundField DataField="Description" HeaderText="<%$ Resources:Description %>"
            SortExpression="Description" >
             <headerstyle horizontalalign="Center" />
         </asp:BoundField>
        <asp:TemplateField SortExpression="Active" HeaderText="<%$ Resources:Active %>">
            <ItemTemplate>
 
                <asp:DropDownList ID="ddlActive" runat="server" Enabled="False" 
                    ondatabinding="ddlActive_DataBinding">
                </asp:DropDownList>
            
</ItemTemplate>
            <HeaderStyle HorizontalAlign="Center" width="40px" />
            <ItemStyle HorizontalAlign="Center" width="40px" />
        </asp:TemplateField>
        <asp:TemplateField ShowHeader="False">
            <EditItemTemplate>
                <asp:LinkButton ID="lbtnUpdate" runat="server" CommandName="Update" Text="<%$ Resources:Update %>"></asp:LinkButton>
                &nbsp;<asp:LinkButton ID="lbtnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                    Text="<%$ Resources:Cancel %>"></asp:LinkButton>
            
</EditItemTemplate>
            <ItemTemplate>
                <asp:LinkButton ID="lbtnEdit" runat="server" CausesValidation="False" CommandName="Select"
                    Text="<%$ Resources:Edit %>"></asp:LinkButton>
            
</ItemTemplate>
            <headerstyle width="40px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField ShowHeader="False">
            <ItemTemplate>
                <asp:LinkButton ID="lbtnDelete" runat="server" CausesValidation="False" CommandName="Delete"
                    OnClientClick="<%$ Resources:DeleteConfirm %>" Text="<%$ Resources:Delete %>"></asp:LinkButton>
            
</ItemTemplate>
            <headerstyle width="40px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
    </Columns>
</My:MyGridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Banner_Delete"
    OldValuesParameterFormatString="original_{0}" SelectMethod="Banner_Select" TypeName="BLL_Banner">
    <DeleteParameters>
        <asp:Parameter Name="original_BannerID" Type="Int32" />
    </DeleteParameters>
</asp:ObjectDataSource>